package com.ease.util.events {
   import com.ease.util.ReflectionUtil;

   import flash.events.Event;

   [SDK]
   /**
    * An event that allows to store a request context in its <code>context</code>
    * property.
    *
    * <p>SDK Version 1.0.0</p>
    */
   public class RequestEvent extends Event {

      /**
       * Optional context that might be required to handle the response. This
       * can be any arbitrary context specified by the client for its own use and
       * will be returned as-is without being interpreted by the request handler.
       */
      public var context:Object;

      /**
       * Constructor.
       */
      public function RequestEvent( type:String, context:Object=null ) {
         super( type );
         this.context = context;
      }

      /**
       * Creates a clone of this event.
       *
       * @return
       *    A clone of this event.
       */
      public override function clone():Event {
         return ReflectionUtil.createShallowClone( this, this.type ) as Event;
      }
   }
}